Next | Prev | Up | Top | Contents | Index

Example 2

The following example lists the steps necessary to load a character device driver called dlkm, using the ml command:

  1. Make sure that the cdevsw_extra kernel tunable parameter allows for extra entries in the cdevsw table. The default settings in /var/sysgen/mtune/kernel are:

    cdevsw_extra233254

    The systune command also lists the current values of all of the tunable parameters. If the kernel is not configured to allow extra entries in the cdevsw table, use the systune command to change the cdevsw_extra parameter:

    # systune -i

    systune-> cdevsw_extra 3

    systune-> quit >

  2. Compile the dlkm.c driver:

    # cc -non_shared -coff -G0 -r -d -Wc,-jalr -c dlkm.c

  3. Load the driver into the kernel:

    # ml ld -c dlkm.o -p dlkm -s38

  4. List the currently loaded modules to verify that the module was loaded:

    # ml list



Next | Prev | Up | Top | Contents | Index